package com.jxtti.service;


import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jxtti.dao.AdminRoleMenuDao;
import com.jxtti.entity.Admin_RoleMenu;



@Service("AdminRoleMenuService")
@Transactional(rollbackFor = { RuntimeException.class, Exception.class })
public class AdminRoleMenuService {
	private final static Logger log= Logger.getLogger(AdminRoleMenuService.class);	

	@Autowired
    private AdminRoleMenuDao<Admin_RoleMenu> adminRoleMenuDao;   
	
	public List<Admin_RoleMenu>  queryAll(Map<String, Object> data)
	{
		return  adminRoleMenuDao.queryByList(data);
	}			
	
	public int add(Admin_RoleMenu entity)
	{
		int insertCount = adminRoleMenuDao.add(entity);
		return insertCount;
	}	
	
	public int update(Admin_RoleMenu entity)
	{
		int updateCount = adminRoleMenuDao.update(entity);
		return updateCount;
	}	
	
	public int delete(Admin_RoleMenu entity)
	{
		int deleteCount = adminRoleMenuDao.delete(entity);		
		return deleteCount;
	}
	
	public int deleteByRole(Admin_RoleMenu entity)
	{
		int deleteCount = adminRoleMenuDao.deleteByRole(entity);		
		return deleteCount;
	}
	

	public Admin_RoleMenu queryListById(Admin_RoleMenu entity)
	{
		entity = adminRoleMenuDao.queryListById(entity);
		return entity;
	}
	
	
}
